package com.rul.mars.user.service;

import com.rul.mars.common.api.CommonResult;
import com.rul.mars.common.domain.UserDto;
import com.rul.mars.mbg.model.Role;
import com.rul.mars.mbg.model.User;

import java.util.List;

public interface UserService {
    void register(String username, String password, String phone, String authCode);

    CommonResult login(String username, String password);

    void updatePassword(String password, String phone, String authCode);

    void updateInfo(User user);

    void generateAuthCode(String phone);

    User currentUser();

    boolean disableUser(Long id);

    boolean deleteUser(Long id);

    UserDto loadUserByUsername(String username);

    List<Role> getRoleList(Long userId);

    int updateRole(Long userId, List<Long> roleIds);

}
